<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>制作名片</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        /* 父元素 */
        .f{
            width: 350px;
            height: 450px;

            position: absolute;
            left: 50%;
            top: 50%;
            /* div宽高的一半  取负值 */
            margin-left: -175px;
            margin-top: -225px;
        }
        img{
            position: absolute;
            left: 0;
            top: 0;
        }
        /* 左边元素：白色三角形 */
        .left{
            position:absolute;
            bottom: 0;
            left: 0;
            
            border-style: solid;
            border-width: 75px 150px;
            border-color: transparent transparent white white;
        }
        /* 右边元素 */
        .right{
            position: absolute;
            bottom: 0;
            right: -1000px;
            opacity: 0;

            border-style: solid;
            border-width: 75px 150px;
            border-color: transparent #428675 #428675 transparent;

            transition: all 2s ease-in;
        }

        .f:hover .right{
            right:0;
            opacity:1;
        }
    </style>
</head>
<body>
    <div class="f">
        <img src="../img/file1.jpg" />
        <div class="left"></div>
        <div class="right"></div>
    </div>
</body>
</html>